/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.aaron.platform.dao;

import java.io.Serializable;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;


/**
 *
 * @author mac
 */
public class HibernateGenericDAO<T, ID extends Serializable> extends HibernateDaoSupport{

    private Class<T> entityType;

    public HibernateGenericDAO(Class<T> entityType)
    {
        this.entityType = entityType;
    }

    public ID save(T entity)
    {
        return (ID)getHibernateTemplate().save(entity);
    }

}
